// Code generated by MockGen. DO NOT EDIT.
// Source: client_v2.go
//
// Generated by this command:
//
//	mockgen -destination mocks/client_v2_mock.go -source client_v2.go -package mocks
//
// Package mocks is a generated GoMock package.
package mocks

import (
	context "context"
	reflect "reflect"

	dfdaemon "d7y.io/api/v2/pkg/apis/dfdaemon/v2"
	gomock "go.uber.org/mock/gomock"
	grpc "google.golang.org/grpc"
)

// MockV2 is a mock of V2 interface.
type MockV2 struct {
	ctrl     *gomock.Controller
	recorder *MockV2MockRecorder
}

// MockV2MockRecorder is the mock recorder for MockV2.
type MockV2MockRecorder struct {
	mock *MockV2
}

// NewMockV2 creates a new mock instance.
func NewMockV2(ctrl *gomock.Controller) *MockV2 {
	mock := &MockV2{ctrl: ctrl}
	mock.recorder = &MockV2MockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockV2) EXPECT() *MockV2MockRecorder {
	return m.recorder
}

// Close mocks base method.
func (m *MockV2) Close() error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Close")
	ret0, _ := ret[0].(error)
	return ret0
}

// Close indicates an expected call of Close.
func (mr *MockV2MockRecorder) Close() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockV2)(nil).Close))
}

// DownloadPiece mocks base method.
func (m *MockV2) DownloadPiece(arg0 context.Context, arg1 *dfdaemon.DownloadPieceRequest, arg2 ...grpc.CallOption) (*dfdaemon.DownloadPieceResponse, error) {
	m.ctrl.T.Helper()
	varargs := []any{arg0, arg1}
	for _, a := range arg2 {
		varargs = append(varargs, a)
	}
	ret := m.ctrl.Call(m, "DownloadPiece", varargs...)
	ret0, _ := ret[0].(*dfdaemon.DownloadPieceResponse)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// DownloadPiece indicates an expected call of DownloadPiece.
func (mr *MockV2MockRecorder) DownloadPiece(arg0, arg1 any, arg2 ...any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	varargs := append([]any{arg0, arg1}, arg2...)
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadPiece", reflect.TypeOf((*MockV2)(nil).DownloadPiece), varargs...)
}

// SyncPieces mocks base method.
func (m *MockV2) SyncPieces(arg0 context.Context, arg1 *dfdaemon.SyncPiecesRequest, arg2 ...grpc.CallOption) (dfdaemon.DfdaemonUpload_SyncPiecesClient, error) {
	m.ctrl.T.Helper()
	varargs := []any{arg0, arg1}
	for _, a := range arg2 {
		varargs = append(varargs, a)
	}
	ret := m.ctrl.Call(m, "SyncPieces", varargs...)
	ret0, _ := ret[0].(dfdaemon.DfdaemonUpload_SyncPiecesClient)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// SyncPieces indicates an expected call of SyncPieces.
func (mr *MockV2MockRecorder) SyncPieces(arg0, arg1 any, arg2 ...any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	varargs := append([]any{arg0, arg1}, arg2...)
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncPieces", reflect.TypeOf((*MockV2)(nil).SyncPieces), varargs...)
}

// TriggerDownloadTask mocks base method.
func (m *MockV2) TriggerDownloadTask(arg0 context.Context, arg1 string, arg2 *dfdaemon.TriggerDownloadTaskRequest, arg3 ...grpc.CallOption) error {
	m.ctrl.T.Helper()
	varargs := []any{arg0, arg1, arg2}
	for _, a := range arg3 {
		varargs = append(varargs, a)
	}
	ret := m.ctrl.Call(m, "TriggerDownloadTask", varargs...)
	ret0, _ := ret[0].(error)
	return ret0
}

// TriggerDownloadTask indicates an expected call of TriggerDownloadTask.
func (mr *MockV2MockRecorder) TriggerDownloadTask(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	varargs := append([]any{arg0, arg1, arg2}, arg3...)
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TriggerDownloadTask", reflect.TypeOf((*MockV2)(nil).TriggerDownloadTask), varargs...)
}
